package org.jpropelleralt.jview.factory;

import org.jpropelleralt.jview.JView;
import org.jpropelleralt.ref.Ref;

/**
 * A source of {@link JView}s of {@link Ref}s
 */
public interface JViewFactory {

	/**
	 * Create a {@link JView} for a {@link Ref}
	 * @param <T>			The type of value in the {@link Ref}
	 * @param valueClass	The {@link Class} of value in the {@link Ref}
	 * @param ref			The {@link Ref} itself
	 * @param locked		While this is true, view will not permit editing (control disabled) 
	 * @param name			The name for the {@link JView} display
	 * @return				A {@link JView} for the {@link Ref}, or null if none is available.
	 */
	public <T> JView viewFor(Class<T> valueClass, Ref<T> ref, Ref<Boolean> locked, Ref<String> name);
	
}
